<template>
<!-- 2021.3.20 by liusixiang 第三方对接 -->
  <div class="main_box">
    <div class="detail_wrap">
        <div class="tit">
            <h2>账号信息</h2>
            <el-button plain size="mini" type="success" icon="fa fa-mail-forward" @click="returnList">返回</el-button>
        </div>
        <div class="con">
          <ul>
            <li>
              <label class="label">第三方</label>
              <span>{{dataInfo.thirdName}}</span>
            </li>
          </ul>
            <ul>
              <li>
                <label class="label">医院名称</label>
                <span>{{dataInfo.hospitalName}}</span>
              </li>
            </ul>
          <ul>
            <li>
              <label class="label">科室名称</label>
              <span>{{dataInfo.officeName}}</span>
            </li>
          </ul>
            <ul>
              <li>
                <label class="label">第三方医院</label>
                <span>{{dataInfo.compName}}</span>
              </li>
            </ul>
            <ul>
              <li>
                <label class="label">下载账号</label>
                <span>{{dataInfo.clientId}}</span>
              </li>
            </ul>
            <ul>
              <li>
                <label class="label">下载密码</label>
                <span>{{dataInfo.clientGuid}}</span>
              </li>
            </ul>
            <ul>
              <li>
                <label class="label">状   态</label>
                <span>{{dataInfo.state | StateFilter }}</span>
              </li>
            </ul>
            <ul>
              <li>
                <label class="label">创建时间</label>
                <span>{{dataInfo.createDate}}</span>
              </li>
            </ul>

        </div>
    </div>
  </div>
</template>

<script>
import OrganApi from "@/api/organ/organ";
export default {
    data() {
        return {
            dataInfo: [],
        }
    },
    mounted() {
        this.init();
    },
    filters: {
      StateFilter(value) {
        if(value === 0 ) {
          return "已被禁用";
        } else if (value === 1) {
          return "启用";
        } else if (value === -1) {
          return '已被删除';
        }
      }
    },
    methods: {
        init() {
            let _this = this
            _this.getData();
        },
        getData() {
            let _this = this
            OrganApi.getThirdAccountInfo({
                accountId: this.$route.query.accountId
            }).then(res => {
                this.dataInfo = res.data
            });
        },
        returnList() {
          this.$store.dispatch('delView', this.$route);
          this.$router.push({ path: '/organ/thirdAccountManagement'});
        }
    }
}
</script>

<style lang="scss" src="@/assets/css/views/Detail.scss" scope>

</style>
